# -*- coding: utf-8 -*-

###########################################################################
## Python code generated with wxFormBuilder (version Oct 26 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################

import wx
import wx.xrc

###########################################################################
## Class EasyImageProcessingToolkit
###########################################################################

class EasyImageProcessingToolkit ( wx.Frame ):

	def __init__( self, parent ):
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Easy Image Processing Toolkit", pos = wx.DefaultPosition, size = wx.Size( 769,536 ), style = wx.CLOSE_BOX|wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )

		self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
		self.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, wx.EmptyString ) )



		self.m_menubar1 = wx.MenuBar( 0 )
		self.menu_file = wx.Menu()
		self.item_openFile = wx.MenuItem( self.menu_file, wx.ID_ANY, u"打开", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_file.Append( self.item_openFile )

		self.menu_file.AppendSeparator()

		self.item_save = wx.MenuItem( self.menu_file, wx.ID_ANY, u"另存为", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_file.Append( self.item_save )

		self.menu_file.AppendSeparator()

		self.item_exit = wx.MenuItem( self.menu_file, wx.ID_ANY, u"退出", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_file.Append( self.item_exit )

		self.m_menubar1.Append( self.menu_file, u"文件" )

		self.menu_edit = wx.Menu()
		self.item_undo = wx.MenuItem( self.menu_edit, wx.ID_ANY, u"退后", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_edit.Append( self.item_undo )
		self.item_undo.Enable( False )

		self.menu_edit.AppendSeparator()

		self.item_redo = wx.MenuItem( self.menu_edit, wx.ID_ANY, u"向前", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_edit.Append( self.item_redo )
		self.item_redo.Enable( False )

		self.menu_edit.AppendSeparator()

		self.item_cut = wx.MenuItem( self.menu_edit, wx.ID_ANY, u"剪切", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_edit.Append( self.item_cut )
		self.item_cut.Enable( False )

		self.menu_edit.AppendSeparator()

		self.item_copy = wx.MenuItem( self.menu_edit, wx.ID_ANY, u"拷贝", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_edit.Append( self.item_copy )
		self.item_copy.Enable( False )

		self.m_menubar1.Append( self.menu_edit, u"编辑" )

		self.menu_transf = wx.Menu()
		self.item_rotate = wx.MenuItem( self.menu_transf, wx.ID_ANY, u"旋转", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_transf.Append( self.item_rotate )

		self.menu_transf.AppendSeparator()

		self.item_flip = wx.MenuItem( self.menu_transf, wx.ID_ANY, u"镜像", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_transf.Append( self.item_flip )

		self.menu_transf.AppendSeparator()

		self.item_resize = wx.MenuItem( self.menu_transf, wx.ID_ANY, u"缩放", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_transf.Append( self.item_resize )

		self.m_menubar1.Append( self.menu_transf, u"变换" )

		self.menu_color = wx.Menu()
		self.item_BGR2RGB = wx.MenuItem( self.menu_color, wx.ID_ANY, u"BGR->RGB", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_color.Append( self.item_BGR2RGB )

		self.menu_color.AppendSeparator()

		self.item_GRAY2BGR = wx.MenuItem( self.menu_color, wx.ID_ANY, u"GRAY->BGR", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_color.Append( self.item_GRAY2BGR )

		self.menu_color.AppendSeparator()

		self.item_BGR2GRAY = wx.MenuItem( self.menu_color, wx.ID_ANY, u"BGR->GRAY", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_color.Append( self.item_BGR2GRAY )

		self.menu_color.AppendSeparator()

		self.item_BGR2LAB = wx.MenuItem( self.menu_color, wx.ID_ANY, u"BGR->LAB", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_color.Append( self.item_BGR2LAB )

		self.menu_color.AppendSeparator()

		self.item_BGR2YCrCb = wx.MenuItem( self.menu_color, wx.ID_ANY, u"BGR->YCrCb", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_color.Append( self.item_BGR2YCrCb )

		self.menu_color.AppendSeparator()

		self.item_binarization = wx.MenuItem( self.menu_color, wx.ID_ANY, u"二值化", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_color.Append( self.item_binarization )

		self.menu_color.AppendSeparator()

		self.item_histogram = wx.MenuItem( self.menu_color, wx.ID_ANY, u"直方图", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_color.Append( self.item_histogram )

		self.menu_color.AppendSeparator()

		self.item_invert = wx.MenuItem( self.menu_color, wx.ID_ANY, u"反向", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_color.Append( self.item_invert )

		self.menu_color.AppendSeparator()

		self.item_contrast = wx.MenuItem( self.menu_color, wx.ID_ANY, u"对比度拉伸", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_color.Append( self.item_contrast )

		self.m_menubar1.Append( self.menu_color, u"颜色" )

		self.menu_filter = wx.Menu()
		self.item_filter = wx.MenuItem( self.menu_filter, wx.ID_ANY, u"图像滤波", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_filter.Append( self.item_filter )

		self.menu_filter.AppendSeparator()

		self.item_edge = wx.MenuItem( self.menu_filter, wx.ID_ANY, u"边缘检测", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_filter.Append( self.item_edge )

		self.menu_filter.AppendSeparator()

		self.item_morph = wx.MenuItem( self.menu_filter, wx.ID_ANY, u"形态学运算", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_filter.Append( self.item_morph )

		self.menu_filter.AppendSeparator()

		self.item_skeleton = wx.MenuItem( self.menu_filter, wx.ID_ANY, u"骨架提取", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_filter.Append( self.item_skeleton )

		self.m_menubar1.Append( self.menu_filter, u"滤波" )

		self.menu_analyse = wx.Menu()
		self.item_blob = wx.MenuItem( self.menu_analyse, wx.ID_ANY, u"Blob分析", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_analyse.Append( self.item_blob )
		self.item_blob.Enable( False )

		self.menu_analyse.AppendSeparator()

		self.item_hough = wx.MenuItem( self.menu_analyse, wx.ID_ANY, u"霍夫检测", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_analyse.Append( self.item_hough )
		self.item_hough.Enable( False )

		self.menu_analyse.AppendSeparator()

		self.item_projection = wx.MenuItem( self.menu_analyse, wx.ID_ANY, u"投影", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_analyse.Append( self.item_projection )
		self.item_projection.Enable( False )

		self.menu_analyse.AppendSeparator()

		self.item_templatematch = wx.MenuItem( self.menu_analyse, wx.ID_ANY, u"模板匹配", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_analyse.Append( self.item_templatematch )
		self.item_templatematch.Enable( False )

		self.m_menubar1.Append( self.menu_analyse, u"分析" )

		self.item_help = wx.Menu()
		self.item_version = wx.MenuItem( self.item_help, wx.ID_ANY, u"版本", wx.EmptyString, wx.ITEM_NORMAL )
		self.item_help.Append( self.item_version )

		self.m_menubar1.Append( self.item_help, u"帮助" )

		self.SetMenuBar( self.m_menubar1 )

		self.m_toolBar1 = self.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY )
		# self.m_tool_open_file = self.m_toolBar1.AddLabelTool( wx.ID_ANY, u"打开文件", wx.Bitmap( u"D:\\test\\pic\\open.ico", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_NORMAL, u"open file", wx.EmptyString, None )
		self.m_tool_open_file = self.m_toolBar1.AddLabelTool( wx.ID_ANY, u"打开文件", wx.Bitmap( r"./pic/open.png", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_NORMAL, u"open file", wx.EmptyString, None )

		self.m_toolBar1.AddSeparator()

		# self.m_tool_drop = self.m_toolBar1.AddLabelTool( wx.ID_ANY, u"拖拽", wx.Bitmap( u"D:\\test\\pic\\drop_image.ico", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_NORMAL, u"drop tool", wx.EmptyString, None )
		self.m_tool_drop = self.m_toolBar1.AddLabelTool( wx.ID_ANY, u"拖拽", wx.Bitmap( r"./pic/drop_image.png", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_NORMAL, u"drop tool", wx.EmptyString, None )

		self.m_toolBar1.Realize()


		self.Centre( wx.BOTH )

		# Connect Events
		self.Bind( wx.EVT_MENU, self.open_file, id = self.item_openFile.GetId() )
		self.Bind( wx.EVT_MENU, self.save_as, id = self.item_save.GetId() )
		self.Bind( wx.EVT_MENU, self.exit_win, id = self.item_exit.GetId() )
		self.Bind( wx.EVT_MENU, self.image_rotate, id = self.item_rotate.GetId() )
		self.Bind( wx.EVT_MENU, self.image_flip, id = self.item_flip.GetId() )
		self.Bind( wx.EVT_MENU, self.image_resize, id = self.item_resize.GetId() )
		self.Bind( wx.EVT_MENU, self.bgr_2_rgb, id = self.item_BGR2RGB.GetId() )
		self.Bind( wx.EVT_MENU, self.gray_2_bgr, id = self.item_GRAY2BGR.GetId() )
		self.Bind( wx.EVT_MENU, self.bgr_2_gray, id = self.item_BGR2GRAY.GetId() )
		self.Bind( wx.EVT_MENU, self.bgr_2_lab, id = self.item_BGR2LAB.GetId() )
		self.Bind( wx.EVT_MENU, self.bgr_2_YCrCb, id = self.item_BGR2YCrCb.GetId() )
		self.Bind( wx.EVT_MENU, self.binarization, id = self.item_binarization.GetId() )
		self.Bind( wx.EVT_MENU, self.histogram, id = self.item_histogram.GetId() )
		self.Bind( wx.EVT_MENU, self.gray_image_invert, id = self.item_invert.GetId() )
		self.Bind( wx.EVT_MENU, self.image_contrast, id = self.item_contrast.GetId() )
		self.Bind( wx.EVT_MENU, self.image_filter, id = self.item_filter.GetId() )
		self.Bind( wx.EVT_MENU, self.image_edge, id = self.item_edge.GetId() )
		self.Bind( wx.EVT_MENU, self.image_morph, id = self.item_morph.GetId() )
		self.Bind( wx.EVT_MENU, self.image_skeleton, id = self.item_skeleton.GetId() )
		self.Bind( wx.EVT_MENU, self.image_blob, id = self.item_blob.GetId() )
		self.Bind( wx.EVT_MENU, self.image_hough, id = self.item_hough.GetId() )
		self.Bind( wx.EVT_MENU, self.image_projection, id = self.item_projection.GetId() )
		self.Bind( wx.EVT_MENU, self.image_match, id = self.item_templatematch.GetId() )
		self.Bind( wx.EVT_MENU, self.version_description, id = self.item_version.GetId() )
		self.Bind( wx.EVT_TOOL, self.item_quick_open, id = self.m_tool_open_file.GetId() )
		self.Bind( wx.EVT_TOOL, self.tool_drop, id = self.m_tool_drop.GetId() )

	def __del__( self ):
		pass


	# Virtual event handlers, overide them in your derived class
	def open_file( self, event ):
		event.Skip()

	def save_as( self, event ):
		event.Skip()

	def exit_win( self, event ):
		event.Skip()

	def image_rotate( self, event ):
		event.Skip()

	def image_flip( self, event ):
		event.Skip()

	def image_resize( self, event ):
		event.Skip()

	def bgr_2_rgb( self, event ):
		event.Skip()

	def gray_2_bgr( self, event ):
		event.Skip()

	def bgr_2_gray( self, event ):
		event.Skip()

	def bgr_2_lab( self, event ):
		event.Skip()

	def bgr_2_YCrCb( self, event ):
		event.Skip()

	def binarization( self, event ):
		event.Skip()

	def histogram( self, event ):
		event.Skip()

	def gray_image_invert( self, event ):
		event.Skip()

	def image_contrast( self, event ):
		event.Skip()

	def image_filter( self, event ):
		event.Skip()

	def image_edge( self, event ):
		event.Skip()

	def image_morph( self, event ):
		event.Skip()

	def image_skeleton( self, event ):
		event.Skip()

	def image_blob( self, event ):
		event.Skip()

	def image_hough( self, event ):
		event.Skip()

	def image_projection( self, event ):
		event.Skip()

	def image_match( self, event ):
		event.Skip()

	def version_description( self, event ):
		event.Skip()

	def item_quick_open( self, event ):
		event.Skip()

	def tool_drop( self, event ):
		event.Skip()


